package cn.village.controller;

import cn.village.entity.IncomeAndExpenditure;
import cn.village.service.IncomeAndExpenditureService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * (IncomeAndExpenditure)表控制层
 *
 * @author makejava
 * @since 2021-02-10 15:33:56
 */
@RestController
@RequestMapping("incomeAndExpenditure")
public class IncomeAndExpenditureController {
    /**
     * 服务对象
     */
    @Resource
    private IncomeAndExpenditureService incomeAndExpenditureService;

    /**
     * 通过主键查询单条数据
     *
     * @param id 主键
     * @return 单条数据
     */
    @GetMapping("selectOne")
    public IncomeAndExpenditure selectOne(Integer id) {
        return this.incomeAndExpenditureService.queryById(id);
    }

}